In a typical large-scale data processing system, physical storage devices (which may include individual storage disk units, RAID (“redundant array of independent disks”) arrays, or a combination) are attached through a controller. One or more host systems are also attached to the controller and may read from and write to attached storage. Physical storage may be “virtualized” whereby a host sends a command to access data on a “logical” volume on a virtual or “emulated” storage device and the controller maps the virtual address into the address of the physical storage space in which the desired data resides. Such an arrangement isolates the hosts from the storage devices, allowing an emulated device to include storage space in more than one physical device. An advantage of virtual storage architecture is that a variety of different types of storage devices may be used and may be physically separated from each other and from the hosts. Moreover, physical storage may be added, removed, relocated or otherwise reorganized by merely updating the address map. Emulated devices may be reorganized in the same manner. Due to command translations and address mapping in the controller, the physical storage is hidden from the hosts which only “see” emulated devices.
One method of virtualizing storage includes mapping each logical volume to a physical volume on a one-to-one basis. More flexible is a method in which the physical devices are divided into “segments” which are then allocated among the emulated devices. Under the latter method, several segments may be concatenated and assigned to a single emulated device. Tables maintain lists of identifiers of the segments assigned to each device. For example, assume a storage subsystem with D=32 K emulated devices and having physical storage space divided into S=1 M segments. For maximum flexibility, the controller should be able to allocate all of segments to a single emulated device and should also be able to allocate the segments among all of the emulated devices, in equal portions or otherwise. In order to meet the first qualification, each of D tables would require entry spaces and the total number of entries would be S*D=32G. If each segment ID is four bytes (which is S=1M=230 rounded to the next highest whole byte) the space required by all of the tables would total 128 GB. If all of the segments were allocated to a single emulated device, only one of the 32K tables would have any entries (it would be full) and the remaining 32K−1 tables would be empty. Thus, 128 GB−4M, or 99.997%, of table storage space in the controller would be empty.
It will be appreciated that such a technique is extremely inefficient. Consequently, there remains a need for storage subsystem in which emulated device tables are defined in such a manner as to minimize the controller space required to store the tables while maintaining the flexibility to allocate the segments among any or all of the devices in any desired fashion, including allocating all segments to a single device.